/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Car_models;
import Model.DALtbl_Car_models;
import java.util.ArrayList;

/**
 *
 * @author Mr-aUgust
 */
public class Btbl_Car_models {
    private DALtbl_Car_models _objDALtbl_Car_models=null;

    public Btbl_Car_models() {
        _objDALtbl_Car_models=new DALtbl_Car_models();
    }
    public boolean addtbl_Car_models(Etbl_Car_models objEtbl_Car_models){
        return _objDALtbl_Car_models.addtbl_Car_models(objEtbl_Car_models);
    }
    public boolean edittbl_Car_models(Etbl_Car_models objEtbl_Car_models){
        return _objDALtbl_Car_models.edittbl_Car_models(objEtbl_Car_models);
    }
    public boolean deletetbl_Car_models(int carmodel_Id){
        if(carmodel_Id>0) //carmodel_Id tu dong tang va bat dau tu 1.
            return _objDALtbl_Car_models.deletetbl_Car_models(carmodel_Id);
        else
            return false;
    }
    public Etbl_Car_models getOne_CarModel(int carmodel_Id){
        if(carmodel_Id>0){
            return _objDALtbl_Car_models.getOne_CarModel(carmodel_Id);
        }else{
            return null;
        }
    }
    public ArrayList<Etbl_Car_models> getList_CarModel(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDALtbl_Car_models.getListCarsModel(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
}
